Is `volatile` required for shared memory accessed via access function?

My reading of C99 is that unless you specify volatile how and when the variable is actually accessed is implementation defined. If you specify volatile qualifier then code must work according to the rules of an abstract machine .

Yes it is critical. Like you said volatile prevents code breaking optimization on shared memory C++98 7.1.5p8. Since you never know what kind of optimization a given compiler may do now or in the future, you should explicitly specify that your variable is volatile.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions